﻿using System;
using System.Collections.Generic;
using System.Text;

namespace daSemanticAnalyser.SemanticTree
{
    using daSyntaxAnalyser.SyntaxTree;

    /// <summary>
    /// Секция класса
    /// </summary>
    public class ClassSectionSemanticElement : SectionedSemanticElement
    {
        private List<ClassPropertySemanticElement> properties;

        /// <summary>
        /// Свойства в секции
        /// </summary>
        public List<ClassPropertySemanticElement> Properties { get { return properties; } set { properties = value; } }

        /// <summary>
        /// Конструктор
        /// </summary>
        /// <param name="Parent">родительский элемент</param>
        /// <param name="Consts">константы</param>
        /// <param name="Resourcestrings">строковые ресурсы</param>
        /// <param name="Types">типы</param>
        /// <param name="Vars">переменные</param>
        /// <param name="Properties">свойства в секции</param>
        /// <param name="Methods">методы</param>
        /// <param name="SyntaxElement">соответствующий элемент синтаксического дерева</param>
        public ClassSectionSemanticElement(IChildSemanticElement Parent, List<ConstSemanticElement> Consts, List<ResourceStringSemanticElement> Resourcestrings, List<CommonTypeSemanticElement> Types, List<VarSemanticElement> Vars, List<ClassPropertySemanticElement> Properties, List<MethodSemanticElement> Methods, ISyntaxTreeElement SyntaxElement)
            : base(Parent, Consts, Resourcestrings, Types, Vars, null, Methods, SyntaxElement)
        {
            properties = (Properties == null) ? new List<ClassPropertySemanticElement>() : Properties;
        }
    }
}
